using System.Linq.Expressions;
using OpenIddict.EntityFrameworkCore.Models;


namespace SageKing.OpenIddict.UI.Infrastructure;

public sealed class AllApplications : BaseSpecification<OpenIddictEntityFrameworkCoreApplication>
{

    public AllApplications()
    {
        ApplyOrderBy(x => x.DisplayName);
        ApplyNoTracking();
    }

    public AllApplications(Expression<Func<OpenIddictEntityFrameworkCoreApplication, object>> orderby)
        : base(orderby, true)
    {
    }

    public AllApplications(PageBaseInput page) : base(page, true)
    {
    }

    public AllApplications(PageBaseInput page,
        Expression<Func<OpenIddictEntityFrameworkCoreApplication, object>> orderby)
        : base(page, orderby, true)
    {
    }

    public AllApplications(PageBaseInput page,
        Expression<Func<OpenIddictEntityFrameworkCoreApplication, object>> orderby,
        List<(bool, Expression<Func<OpenIddictEntityFrameworkCoreApplication, bool>>)> whereIf)
        : base(page, orderby, whereIf, true)
    {
    }
}
